package com.itheima.demo04.Calendar;

import java.util.Calendar;
import java.util.Date;

public class Test02 {
    public static void main(String[] args) {
        Calendar c = Calendar.getInstance();
        int year = c.get(Calendar.YEAR);
        System.out.println(year);
        int month = c.get(Calendar.MONTH)+1;
        System.out.println(month);
        c.set(Calendar.YEAR,2088);
        System.out.println(c.get(Calendar.YEAR));
        c.add(Calendar.YEAR,2);
        System.out.println(c.get(Calendar.YEAR));
        Date time = c.getTime();
        System.out.println(time);
    }
}
